﻿<phone:PhoneApplicationPage 
    x:Class="PhoneInfo.Page.PK"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
	xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls" 
	xmlns:controlsPrimitives="clr-namespace:Microsoft.Phone.Controls.Primitives;assembly=Microsoft.Phone.Controls" 
    SupportedOrientations="Portrait" Orientation="Portrait" toolkit:TiltEffect.IsTiltEnabled="True" 
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480" Style="{StaticResource TransitionPageStyle}"
    shell:SystemTray.IsVisible="True"
    xmlns:local="clr-namespace:PhoneInfo" 
    xmlns:delay="clr-namespace:Delay;assembly=PhonePerformance" 
    xmlns:sys="clr-namespace:System;assembly=mscorlib">
    <phone:PhoneApplicationPage.Resources>
        <local:FixEmptyUrl x:Key="FixUrl"/>
        <local:BoolToVis x:Key="BoolToVis"/>

        <shell:ApplicationBar x:Key="AppBar" BackgroundColor="#0a76d2"  ForegroundColor="#ffffffff">
            <shell:ApplicationBarIconButton Click="ApplicationBarIconButton_Click" Text="自选PK" IconUri="/Icon/info/i_search.png"/>
        </shell:ApplicationBar>
        <shell:ApplicationBar x:Key="AppBar1" BackgroundColor="#212121"  ForegroundColor="#ffffffff">
            <shell:ApplicationBarIconButton Click="ApplicationBarIconButton_Click" Text="自选PK" IconUri="/Icon/black/i_search.png"/>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.Resources>
        
    <phone:PhoneApplicationPage.FontFamily>
        <StaticResource ResourceKey="PhoneFontFamilyNormal"/>
    </phone:PhoneApplicationPage.FontFamily>
    <phone:PhoneApplicationPage.FontSize>
        <StaticResource ResourceKey="PhoneFontSizeNormal"/>
    </phone:PhoneApplicationPage.FontSize>
    <phone:PhoneApplicationPage.Foreground>
        <StaticResource ResourceKey="PhoneForegroundBrush"/>
    </phone:PhoneApplicationPage.Foreground>

    <!--LayoutRoot 是包含所有页面内容的根网格-->
    <Grid x:Name="LayoutRoot" Background="{Binding Source={StaticResource Theme}, Path=cuTheme.TextBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel 包含应用程序的名称和页标题-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="PageTitle" Foreground="{Binding Source={StaticResource Theme}, Path=cuTheme.TitleBrush}"
                       Text="PK" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}" FontSize="48" />
        </StackPanel>

        <!--ContentPanel - 在此处放置其他内容-->
        <Grid x:Name="ContentPanel" Margin="12,94,12,8" Grid.RowSpan="2" >
            <ListBox Name="lst" ItemsSource="{Binding PhonePkItems}" Tap="ListBox_Tap_1">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal" Margin="5,10" Width="480">
                            <Border BorderThickness="1" BorderBrush="#FF1BA1E2" Height="113">
                                <StackPanel Orientation="Horizontal" Width="196" HorizontalAlignment="Left" VerticalAlignment="Top" Height="116">
                                    <Grid  Width="80" Margin="0,0,0,5" Background="#ffffff">
                                        <Image  Stretch="Uniform" 
                                              delay:LowProfileImageLoader.UriSource="{Binding Ponhe1_picurl, Converter={StaticResource FixUrl}}" 
                                              HorizontalAlignment="Center"  VerticalAlignment="Center"  />
                                    </Grid>
                                    <StackPanel Orientation="Vertical" Margin="0" 
									Background="{Binding Source={StaticResource Theme}, Path=cuTheme.NavyAndBlue}" 
									Width="116" HorizontalAlignment="Left" VerticalAlignment="Top" Height="116" >
                                        <TextBlock  Text="{Binding Ponhe1_ppname}" FontSize="26" Margin="10,10,0,0"
										 Foreground="{Binding Source={StaticResource Theme}, Path=cuTheme.GrayAndWhite}" HorizontalAlignment="Left" Width="106"/>
                                        <TextBlock  Text="{Binding Ponhe1_phonename}"  TextWrapping="Wrap"  Height="30"
									            FontSize="20" Margin="10,10,0,0" 
												Foreground="{Binding Source={StaticResource Theme}, Path=cuTheme.GrayAndWhite}" 
                                                d:LayoutOverrides="HorizontalMargin" />
                                    </StackPanel>
                                </StackPanel>
                            </Border>
                            <Image Height="111" Width="51" Source="/Icon/selectCenter/pk.png" Stretch="None"/>
                            <Border BorderThickness="1" BorderBrush="#FF1BA1E2" Width="223" Height="112">
                                <StackPanel Orientation="Horizontal" Width="219" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0">
                                    <Grid  Width="83" Height="111" Margin="0"  Background="#ffffff">
                                        <Image Stretch="Uniform" 
                                                    delay:LowProfileImageLoader.UriSource="{Binding Ponhe2_picurl, Converter={StaticResource FixUrl}}" 
                                                    HorizontalAlignment="Center"  VerticalAlignment="Center" />
                                    </Grid>
                                    <StackPanel Orientation="Vertical" Margin="0" 
									Background="{Binding Source={StaticResource Theme}, Path=cuTheme.NavyAndBlue}" 
									Width="138" HorizontalAlignment="Left" VerticalAlignment="Top" Height="110" >
                                        <TextBlock  Text="{Binding Ponhe2_ppname}" FontSize="26" Margin="10,10,10,0" Foreground="#ffffffff"/>
                                        <TextBlock  Text="{Binding Ponhe2_phonename}" Height="30" FontSize="20" Margin="10,10,10,0" Foreground="#ffffffff"
									 TextWrapping="Wrap"/>
                                    </StackPanel>
                                </StackPanel>
                            </Border>
                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </Grid>
    </Grid>



</phone:PhoneApplicationPage>
